{% extends "user/common.html" %}

{% block title %}图书详情{% endblock %}

{% block head %}
    <link rel="stylesheet" type="text/css" href="{{ url_for("static", filename="css/user/book.css") }}">
{% endblock %}

{% block body %}
    <header>
        <h1>图书详情</h1>
    </header>
    <footer>
        <div>
            <img src="{{ data.book.image_url }}" alt="img">
        </div>
        <div class="info">
            <div class="book_name">{{ data.book.book_name }}</div>
            <div class="item">
                <div class="author">{{ data.book.author }}</div>
                <div class="borrow">借阅
                    <text style="color: red">{{ data.book.borrow_count }}</text>
                    次
                </div>
            </div>
            <div class="item text">
                <P>{{ data.book.text }}</P>
            </div>
            <div class="item inventory">库存：{{ data.book.current_number }}/{{ data.book.number }}</div>
            <div class="line">
                <button class="btn" onclick="window.location.href='{{ url_for('blueprint.collect', id=data.book.book_id) }}'">收藏</button>
                <button class="btn">借阅</button>
            </div>
        </div>
    </footer>
{% endblock %}